package com.webframe.util;

import javax.servlet.ServletContext;

import org.springframework.context.ApplicationContext;

/**
 * 类功能描述：spring容器工具类，用于无法获取request的地方查找spring中注册的资源
 *
 * @author <a href="mailto:qingyu.meng21@gmail.com">mengqingyu </a>
 * @version $Id: ApplicationContextKeeper.java,v 1.2 2010/11/01 07:16:43 chenfuzhong Exp $
 * Create:  2009-12-31 下午01:59:41
 */
public class ApplicationContextKeeper
{
   
	private static ApplicationContext appCtx = null;
   private static ServletContext servletCtx = null;
   
   public static ApplicationContext getAppCtx() {
   	return appCtx;
   }

   public static void init(ApplicationContext ctxVal,ServletContext servletCtx) {
   	appCtx = ctxVal;
   	ApplicationContextKeeper.servletCtx = servletCtx;
   }
   public static ServletContext getServletCtx()
	{
		return servletCtx;
	}
}
